\hypertarget{cordic_8c}{}\section{cordic/cordic.c File Reference}
\label{cordic_8c}\index{cordic/cordic.\+c@{cordic/cordic.\+c}}


Cordic Routines Handle angle outside of the first quadrant Added standalone test to verify C\+O\+R\+D\+IC against math library Add Documentation and references.  


{\ttfamily \#include \char`\"{}user\+\_\+config.\+h\char`\"{}}\\*
{\ttfamily \#include $<$stdint.\+h$>$}\\*
{\ttfamily \#include $<$string.\+h$>$}\\*
{\ttfamily \#include \char`\"{}printf/mathio.\+h\char`\"{}}\\*
{\ttfamily \#include $<$math.\+h$>$}\\*
{\ttfamily \#include \char`\"{}cordic2c\+\_\+inc.\+h\char`\"{}}\\*
{\ttfamily \#include \char`\"{}cordic.\+h\char`\"{}}\\*
\subsection*{Macros}
\begin{DoxyCompactItemize}
\item 
\#define \hyperlink{cordic_8c_a575a13df8fab592b70c5968d27dbd338}{C\+O\+R\+D\+I\+C\+\_\+\+T\+A\+B\+LE}~/$\ast$ include the generated Cordic table $\ast$/
\end{DoxyCompactItemize}
\subsection*{Functions}
\begin{DoxyCompactItemize}
\item 
\hyperlink{earth2wireframe_8c_ad0fe97585b8891f5e4f2b9a6426330a4}{M\+E\+M\+S\+P\+A\+CE} double \hyperlink{cordic_8c_a0de74b8b36857d95aadfc48438b64259}{deg2rad} (double deg)
\begin{DoxyCompactList}\small\item\em Convert Degrees to Rads. \end{DoxyCompactList}\item 
\hyperlink{earth2wireframe_8c_ad0fe97585b8891f5e4f2b9a6426330a4}{M\+E\+M\+S\+P\+A\+CE} double \hyperlink{cordic_8c_ae1719101cd5b3cb0c89cf03c436c551e}{angle\+\_\+quad} (double quads, int $\ast$quad)
\begin{DoxyCompactList}\small\item\em Compute quadrant of angle and the quadrant modulus Note\+: Integer part is quadrant. \end{DoxyCompactList}\item 
void \hyperlink{cordic_8c_a9e686d8e990a05ea18655a368e6d1918}{Circular} (\hyperlink{cordic2c__inc_8h_a97ad155ac7434ee543385126cd1d3313}{Cordic\+\_\+T} \hyperlink{ili9341_8c_a12ad102c2d1e7e119fdc040b0c922c7e}{x}, \hyperlink{cordic2c__inc_8h_a97ad155ac7434ee543385126cd1d3313}{Cordic\+\_\+T} \hyperlink{ili9341_8c_afe490938209e0b6b15224c05a01f0b40}{y}, \hyperlink{cordic2c__inc_8h_a97ad155ac7434ee543385126cd1d3313}{Cordic\+\_\+T} z)
\item 
\hyperlink{earth2wireframe_8c_ad0fe97585b8891f5e4f2b9a6426330a4}{M\+E\+M\+S\+P\+A\+CE} void \hyperlink{cordic_8c_ab9bc8a20d99938e647047015d62f6f86}{cordic\+\_\+quad} (double angle, double $\ast$s, double $\ast$c)
\begin{DoxyCompactList}\small\item\em Compute Sin and Cos from angle in quads using Cordic. \end{DoxyCompactList}\item 
\hyperlink{earth2wireframe_8c_ad0fe97585b8891f5e4f2b9a6426330a4}{M\+E\+M\+S\+P\+A\+CE} void \hyperlink{cordic_8c_a5d8ba4ae520a41add87512173a9289ef}{cordic\+\_\+deg} (double deg, double $\ast$s, double $\ast$c)
\begin{DoxyCompactList}\small\item\em Compute Sin and Cos from angle in degrees using Cordic. \end{DoxyCompactList}\item 
\hyperlink{earth2wireframe_8c_ad0fe97585b8891f5e4f2b9a6426330a4}{M\+E\+M\+S\+P\+A\+CE} void \hyperlink{cordic_8c_ab5dff4f6a6c29502d824cc7574c13f1c}{cordic\+\_\+rad} (double rad, double $\ast$s, double $\ast$c)
\begin{DoxyCompactList}\small\item\em Compute Sin and Cos from angle in Rads using Cordic. \end{DoxyCompactList}\item 
\hyperlink{earth2wireframe_8c_ad0fe97585b8891f5e4f2b9a6426330a4}{M\+E\+M\+S\+P\+A\+CE} void \hyperlink{cordic_8c_ae708dfda7767e28c3faeedf2c46deafd}{scale\+\_\+point} (\hyperlink{structpoint}{point} $\ast$P, double scale)
\begin{DoxyCompactList}\small\item\em Scale x,y,z by scale factor. \end{DoxyCompactList}\item 
\hyperlink{earth2wireframe_8c_ad0fe97585b8891f5e4f2b9a6426330a4}{M\+E\+M\+S\+P\+A\+CE} void \hyperlink{cordic_8c_a11f885e103030cb15b2f3477e21b780f}{shift\+\_\+point} (\hyperlink{structpoint}{point} $\ast$P, \hyperlink{structpoint}{point} $\ast$shift)
\begin{DoxyCompactList}\small\item\em Shift x,y,z by shift. \end{DoxyCompactList}\item 
\hyperlink{earth2wireframe_8c_ad0fe97585b8891f5e4f2b9a6426330a4}{M\+E\+M\+S\+P\+A\+CE} void \hyperlink{cordic_8c_a11674104e89537aef6922d07f34e62ae}{rotate} (\hyperlink{structpoint}{point} $\ast$P, \hyperlink{structpoint}{point} $\ast$V)
\begin{DoxyCompactList}\small\item\em Rotate point P by View point. \end{DoxyCompactList}\item 
\hyperlink{earth2wireframe_8c_ad0fe97585b8891f5e4f2b9a6426330a4}{M\+E\+M\+S\+P\+A\+CE} void \hyperlink{cordic_8c_a793b036235e0fdd6e799866fcb14e7e4}{Perspective\+Projection} (\hyperlink{structpoint}{point} $\ast$P, double scale, int \hyperlink{ili9341_8c_a12ad102c2d1e7e119fdc040b0c922c7e}{x}, int \hyperlink{ili9341_8c_afe490938209e0b6b15224c05a01f0b40}{y})
\end{DoxyCompactItemize}
\subsection*{Variables}
\begin{DoxyCompactItemize}
\item 
\hyperlink{cordic2c__inc_8h_a97ad155ac7434ee543385126cd1d3313}{Cordic\+\_\+T} \hyperlink{cordic_8c_a46b4b48ef8c0c01099eb3bcdde8aa8db}{X}
\begin{DoxyCompactList}\small\item\em Main Cordic routine -\/ used for basic trig and vector rotations We use fixed point numbers, where 1.\+0=Cordic\+\_\+\+One \hyperlink{cordic_8h}{cordic.\+h}. \end{DoxyCompactList}\item 
\hyperlink{cordic2c__inc_8h_a97ad155ac7434ee543385126cd1d3313}{Cordic\+\_\+T} \hyperlink{cordic_8c_ab746e677f466f17031e92ed577fc3c15}{Y}
\item 
\hyperlink{cordic2c__inc_8h_a97ad155ac7434ee543385126cd1d3313}{Cordic\+\_\+T} \hyperlink{cordic_8c_a3da94d1c83a43c30add6c05fbbe1f194}{Z}
\end{DoxyCompactItemize}


\subsection{Detailed Description}
Cordic Routines Handle angle outside of the first quadrant Added standalone test to verify C\+O\+R\+D\+IC against math library Add Documentation and references. 

Cordic Code Modified by Mike Gore 2015 to generate C Cordic tables The code has been adjusted to quads (Where 90 degrees = 1.\+0) The angle is just the fractional part of a floating point number The integer part is the quadrant. This makes computations for code using the tables much faster.

\begin{DoxySeeAlso}{See also}
\href{http://en.wikipedia.org/wiki/CORDIC}{\tt http\+://en.\+wikipedia.\+org/wiki/\+C\+O\+R\+D\+IC} 

\hyperlink{cordic_8h}{cordic.\+h}, we use fixed \hyperlink{structpoint}{point} numbers, where 1.\+0=\hyperlink{cordic2c_8c_a75d478dd9c919ea7ecf27cc49b9dab58}{Cordic\+\_\+\+One} Note\+: 1.\+0 = 90 degrees
\end{DoxySeeAlso}
\begin{DoxyParagraph}{Copyright \copyright{} 2015 Mike Gore, G\+PL License}

\end{DoxyParagraph}
\begin{DoxyParagraph}{You are free to use this code under the terms of G\+PL}
please retain a copy of this notice in any code you use it in.
\end{DoxyParagraph}
This is free software\+: you can redistribute it and/or modify it under the terms of the G\+NU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This software is distributed in the hope that it will be useful, but W\+I\+T\+H\+O\+UT A\+NY W\+A\+R\+R\+A\+N\+TY; without even the implied warranty of M\+E\+R\+C\+H\+A\+N\+T\+A\+B\+I\+L\+I\+TY or F\+I\+T\+N\+E\+SS F\+OR A P\+A\+R\+T\+I\+C\+U\+L\+AR P\+U\+R\+P\+O\+SE. See the G\+NU General Public License for more details.

You should have received a copy of the G\+NU General Public License along with this program. If not, see \href{http://www.gnu.org/licenses/}{\tt http\+://www.\+gnu.\+org/licenses/}.

Original Documentation

C\+O\+R\+D\+IC algorithms. The original code was published in Doctor Dobbs Journal issue ddj9010. The ddj version can be obtained using F\+TP from S\+I\+M\+T\+EL and other places.

Converted to A\+N\+S\+I-\/C (with prototypes) by P. Knoppers, 13-\/\+Apr-\/1992.

The main advantage of the C\+O\+R\+D\+IC algorithms is that all commonly used math Functions (\mbox{[}a\mbox{]}sin\mbox{[}h\mbox{]} \mbox{[}a\mbox{]}cos\mbox{[}h\mbox{]} \mbox{[}a\mbox{]}tan\mbox{[}h\mbox{]} atah\href{y/x}{\tt h} ln exp sqrt) are Implemented using only shifts, add, subtract and compare. All values are treated as integers. Actually they are fixed point values. The position of the fixed point is a compile time constant (Cordic\+\_\+\+T\+\_\+\+Fraction\+Bits). I don\textquotesingle{}t believe that this can be easily fixed...

Some initialization of internal tables and constants is necessary before all functions can be used. The constant \char`\"{}\+Cordic\+\_\+\+Half\+P\+I\char`\"{} must be determined before compile time, all others are computed during run-\/time -\/ see \hyperlink{cordic2c_8c_a0ddf1224851353fc92bfbff6f499fa97}{main()} below.

Of course, any serious implementation of these functions should probably have {\itshape all} constants determined sometime before run-\/time and most functions might be written in assembler.

The layout of the code is adapted to my personal preferences. PK. 

\subsection{Macro Definition Documentation}
\index{cordic.\+c@{cordic.\+c}!C\+O\+R\+D\+I\+C\+\_\+\+T\+A\+B\+LE@{C\+O\+R\+D\+I\+C\+\_\+\+T\+A\+B\+LE}}
\index{C\+O\+R\+D\+I\+C\+\_\+\+T\+A\+B\+LE@{C\+O\+R\+D\+I\+C\+\_\+\+T\+A\+B\+LE}!cordic.\+c@{cordic.\+c}}
\subsubsection[{\texorpdfstring{C\+O\+R\+D\+I\+C\+\_\+\+T\+A\+B\+LE}{CORDIC_TABLE}}]{\setlength{\rightskip}{0pt plus 5cm}\#define C\+O\+R\+D\+I\+C\+\_\+\+T\+A\+B\+LE~/$\ast$ include the generated Cordic table $\ast$/}\hypertarget{cordic_8c_a575a13df8fab592b70c5968d27dbd338}{}\label{cordic_8c_a575a13df8fab592b70c5968d27dbd338}


Definition at line 35 of file cordic.\+c.



\subsection{Function Documentation}
\index{cordic.\+c@{cordic.\+c}!angle\+\_\+quad@{angle\+\_\+quad}}
\index{angle\+\_\+quad@{angle\+\_\+quad}!cordic.\+c@{cordic.\+c}}
\subsubsection[{\texorpdfstring{angle\+\_\+quad(double quads, int $\ast$quad)}{angle_quad(double quads, int *quad)}}]{\setlength{\rightskip}{0pt plus 5cm}{\bf M\+E\+M\+S\+P\+A\+CE} double angle\+\_\+quad (
\begin{DoxyParamCaption}
\item[{double}]{quads, }
\item[{int $\ast$}]{quad}
\end{DoxyParamCaption}
)}\hypertarget{cordic_8c_ae1719101cd5b3cb0c89cf03c436c551e}{}\label{cordic_8c_ae1719101cd5b3cb0c89cf03c436c551e}


Compute quadrant of angle and the quadrant modulus Note\+: Integer part is quadrant. 

\begin{DoxySeeAlso}{See also}
\hyperlink{cordic_8h}{cordic.\+h}, we use fixed \hyperlink{structpoint}{point} numbers, where 1.\+0=\hyperlink{cordic2c_8c_a75d478dd9c919ea7ecf27cc49b9dab58}{Cordic\+\_\+\+One} Note\+: 1.\+0 = 90 degrees 
\end{DoxySeeAlso}

\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em quads} & 1.\+0 = 90 degrees \\
\hline
\mbox{\tt out}  & {\em quad} & quadrant 0 = 0 .. 89.\+9999, 1 = 90 ... 179.\+999 ..., etc \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
fractional part of quads 
\end{DoxyReturn}


Definition at line 71 of file cordic.\+c.



Referenced by cordic\+\_\+quad().

\index{cordic.\+c@{cordic.\+c}!Circular@{Circular}}
\index{Circular@{Circular}!cordic.\+c@{cordic.\+c}}
\subsubsection[{\texorpdfstring{Circular(\+Cordic\+\_\+\+T x, Cordic\+\_\+\+T y, Cordic\+\_\+\+T z)}{Circular(Cordic_T x, Cordic_T y, Cordic_T z)}}]{\setlength{\rightskip}{0pt plus 5cm}void Circular (
\begin{DoxyParamCaption}
\item[{{\bf Cordic\+\_\+T}}]{x, }
\item[{{\bf Cordic\+\_\+T}}]{y, }
\item[{{\bf Cordic\+\_\+T}}]{z}
\end{DoxyParamCaption}
)}\hypertarget{cordic_8c_a9e686d8e990a05ea18655a368e6d1918}{}\label{cordic_8c_a9e686d8e990a05ea18655a368e6d1918}


Definition at line 103 of file cordic.\+c.



Referenced by cordic\+\_\+quad().

\index{cordic.\+c@{cordic.\+c}!cordic\+\_\+deg@{cordic\+\_\+deg}}
\index{cordic\+\_\+deg@{cordic\+\_\+deg}!cordic.\+c@{cordic.\+c}}
\subsubsection[{\texorpdfstring{cordic\+\_\+deg(double deg, double $\ast$s, double $\ast$c)}{cordic_deg(double deg, double *s, double *c)}}]{\setlength{\rightskip}{0pt plus 5cm}{\bf M\+E\+M\+S\+P\+A\+CE} void cordic\+\_\+deg (
\begin{DoxyParamCaption}
\item[{double}]{deg, }
\item[{double $\ast$}]{s, }
\item[{double $\ast$}]{c}
\end{DoxyParamCaption}
)}\hypertarget{cordic_8c_a5d8ba4ae520a41add87512173a9289ef}{}\label{cordic_8c_a5d8ba4ae520a41add87512173a9289ef}


Compute Sin and Cos from angle in degrees using Cordic. 

\begin{DoxySeeAlso}{See also}
\href{http://en.wikipedia.org/wiki/CORDIC}{\tt http\+://en.\+wikipedia.\+org/wiki/\+C\+O\+R\+D\+IC} 
\end{DoxySeeAlso}

\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em deg} & angle in degrees \\
\hline
\mbox{\tt in,out}  & {\em $\ast$s} & sin \\
\hline
\mbox{\tt in,out}  & {\em $\ast$c} & cos \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
void 
\end{DoxyReturn}


Definition at line 215 of file cordic.\+c.



Referenced by Perspective\+Projection(), and rotate().

\index{cordic.\+c@{cordic.\+c}!cordic\+\_\+quad@{cordic\+\_\+quad}}
\index{cordic\+\_\+quad@{cordic\+\_\+quad}!cordic.\+c@{cordic.\+c}}
\subsubsection[{\texorpdfstring{cordic\+\_\+quad(double angle, double $\ast$s, double $\ast$c)}{cordic_quad(double angle, double *s, double *c)}}]{\setlength{\rightskip}{0pt plus 5cm}{\bf M\+E\+M\+S\+P\+A\+CE} void cordic\+\_\+quad (
\begin{DoxyParamCaption}
\item[{double}]{angle, }
\item[{double $\ast$}]{s, }
\item[{double $\ast$}]{c}
\end{DoxyParamCaption}
)}\hypertarget{cordic_8c_ab9bc8a20d99938e647047015d62f6f86}{}\label{cordic_8c_ab9bc8a20d99938e647047015d62f6f86}


Compute Sin and Cos from angle in quads using Cordic. 

\begin{DoxySeeAlso}{See also}
\href{http://en.wikipedia.org/wiki/CORDIC}{\tt http\+://en.\+wikipedia.\+org/wiki/\+C\+O\+R\+D\+IC} 
\end{DoxySeeAlso}

\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em angle} & angle in quads ( 1 quad = 90 degrees) \\
\hline
\mbox{\tt out}  & {\em $\ast$s} & sin \\
\hline
\mbox{\tt out}  & {\em $\ast$c} & cos \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
void 
\end{DoxyReturn}


Definition at line 144 of file cordic.\+c.



Referenced by cordic\+\_\+deg(), and cordic\+\_\+rad().

\index{cordic.\+c@{cordic.\+c}!cordic\+\_\+rad@{cordic\+\_\+rad}}
\index{cordic\+\_\+rad@{cordic\+\_\+rad}!cordic.\+c@{cordic.\+c}}
\subsubsection[{\texorpdfstring{cordic\+\_\+rad(double rad, double $\ast$s, double $\ast$c)}{cordic_rad(double rad, double *s, double *c)}}]{\setlength{\rightskip}{0pt plus 5cm}{\bf M\+E\+M\+S\+P\+A\+CE} void cordic\+\_\+rad (
\begin{DoxyParamCaption}
\item[{double}]{rad, }
\item[{double $\ast$}]{s, }
\item[{double $\ast$}]{c}
\end{DoxyParamCaption}
)}\hypertarget{cordic_8c_ab5dff4f6a6c29502d824cc7574c13f1c}{}\label{cordic_8c_ab5dff4f6a6c29502d824cc7574c13f1c}


Compute Sin and Cos from angle in Rads using Cordic. 

\begin{DoxySeeAlso}{See also}
\href{http://en.wikipedia.org/wiki/CORDIC}{\tt http\+://en.\+wikipedia.\+org/wiki/\+C\+O\+R\+D\+IC} 
\end{DoxySeeAlso}

\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em rad} & angle in radians \\
\hline
\mbox{\tt out}  & {\em $\ast$s} & sin \\
\hline
\mbox{\tt out}  & {\em $\ast$c} & cos \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
void 
\end{DoxyReturn}


Definition at line 228 of file cordic.\+c.

\index{cordic.\+c@{cordic.\+c}!deg2rad@{deg2rad}}
\index{deg2rad@{deg2rad}!cordic.\+c@{cordic.\+c}}
\subsubsection[{\texorpdfstring{deg2rad(double deg)}{deg2rad(double deg)}}]{\setlength{\rightskip}{0pt plus 5cm}{\bf M\+E\+M\+S\+P\+A\+CE} double deg2rad (
\begin{DoxyParamCaption}
\item[{double}]{deg}
\end{DoxyParamCaption}
)}\hypertarget{cordic_8c_a0de74b8b36857d95aadfc48438b64259}{}\label{cordic_8c_a0de74b8b36857d95aadfc48438b64259}


Convert Degrees to Rads. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em deg} & degrees \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
radians 
\end{DoxyReturn}


Definition at line 57 of file cordic.\+c.

\index{cordic.\+c@{cordic.\+c}!Perspective\+Projection@{Perspective\+Projection}}
\index{Perspective\+Projection@{Perspective\+Projection}!cordic.\+c@{cordic.\+c}}
\subsubsection[{\texorpdfstring{Perspective\+Projection(point $\ast$\+P, double scale, int x, int y)}{PerspectiveProjection(point *P, double scale, int x, int y)}}]{\setlength{\rightskip}{0pt plus 5cm}{\bf M\+E\+M\+S\+P\+A\+CE} void Perspective\+Projection (
\begin{DoxyParamCaption}
\item[{{\bf point} $\ast$}]{P, }
\item[{double}]{scale, }
\item[{int}]{x, }
\item[{int}]{y}
\end{DoxyParamCaption}
)}\hypertarget{cordic_8c_a793b036235e0fdd6e799866fcb14e7e4}{}\label{cordic_8c_a793b036235e0fdd6e799866fcb14e7e4}


Definition at line 310 of file cordic.\+c.



Referenced by wire\+\_\+draw().

\index{cordic.\+c@{cordic.\+c}!rotate@{rotate}}
\index{rotate@{rotate}!cordic.\+c@{cordic.\+c}}
\subsubsection[{\texorpdfstring{rotate(point $\ast$\+P, point $\ast$\+V)}{rotate(point *P, point *V)}}]{\setlength{\rightskip}{0pt plus 5cm}{\bf M\+E\+M\+S\+P\+A\+CE} void rotate (
\begin{DoxyParamCaption}
\item[{{\bf point} $\ast$}]{P, }
\item[{{\bf point} $\ast$}]{V}
\end{DoxyParamCaption}
)}\hypertarget{cordic_8c_a11674104e89537aef6922d07f34e62ae}{}\label{cordic_8c_a11674104e89537aef6922d07f34e62ae}


Rotate point P by View point. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em $\ast$P} & x,y,z point \\
\hline
\mbox{\tt in}  & {\em $\ast$V} & View point \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
void 
\end{DoxyReturn}


Definition at line 265 of file cordic.\+c.



Referenced by wire\+\_\+draw().

\index{cordic.\+c@{cordic.\+c}!scale\+\_\+point@{scale\+\_\+point}}
\index{scale\+\_\+point@{scale\+\_\+point}!cordic.\+c@{cordic.\+c}}
\subsubsection[{\texorpdfstring{scale\+\_\+point(point $\ast$\+P, double scale)}{scale_point(point *P, double scale)}}]{\setlength{\rightskip}{0pt plus 5cm}{\bf M\+E\+M\+S\+P\+A\+CE} void scale\+\_\+point (
\begin{DoxyParamCaption}
\item[{{\bf point} $\ast$}]{P, }
\item[{double}]{scale}
\end{DoxyParamCaption}
)}\hypertarget{cordic_8c_ae708dfda7767e28c3faeedf2c46deafd}{}\label{cordic_8c_ae708dfda7767e28c3faeedf2c46deafd}


Scale x,y,z by scale factor. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em $\ast$P} & x,y,z point \\
\hline
\mbox{\tt in}  & {\em scale} & scale factor \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
void 
\end{DoxyReturn}


Definition at line 239 of file cordic.\+c.

\index{cordic.\+c@{cordic.\+c}!shift\+\_\+point@{shift\+\_\+point}}
\index{shift\+\_\+point@{shift\+\_\+point}!cordic.\+c@{cordic.\+c}}
\subsubsection[{\texorpdfstring{shift\+\_\+point(point $\ast$\+P, point $\ast$shift)}{shift_point(point *P, point *shift)}}]{\setlength{\rightskip}{0pt plus 5cm}{\bf M\+E\+M\+S\+P\+A\+CE} void shift\+\_\+point (
\begin{DoxyParamCaption}
\item[{{\bf point} $\ast$}]{P, }
\item[{{\bf point} $\ast$}]{shift}
\end{DoxyParamCaption}
)}\hypertarget{cordic_8c_a11f885e103030cb15b2f3477e21b780f}{}\label{cordic_8c_a11f885e103030cb15b2f3477e21b780f}


Shift x,y,z by shift. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em $\ast$P} & x,y,z point \\
\hline
\mbox{\tt in}  & {\em shift} & shift to apply to x,y,z \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
void 
\end{DoxyReturn}


Definition at line 252 of file cordic.\+c.



\subsection{Variable Documentation}
\index{cordic.\+c@{cordic.\+c}!X@{X}}
\index{X@{X}!cordic.\+c@{cordic.\+c}}
\subsubsection[{\texorpdfstring{X}{X}}]{\setlength{\rightskip}{0pt plus 5cm}{\bf Cordic\+\_\+T} X}\hypertarget{cordic_8c_a46b4b48ef8c0c01099eb3bcdde8aa8db}{}\label{cordic_8c_a46b4b48ef8c0c01099eb3bcdde8aa8db}


Main Cordic routine -\/ used for basic trig and vector rotations We use fixed point numbers, where 1.\+0=Cordic\+\_\+\+One \hyperlink{cordic_8h}{cordic.\+h}. 

\begin{DoxySeeAlso}{See also}
\href{http://en.wikipedia.org/wiki/CORDIC}{\tt http\+://en.\+wikipedia.\+org/wiki/\+C\+O\+R\+D\+IC} 
\end{DoxySeeAlso}

\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in,out}  & {\em x} & in\+: Cordik\+\_\+K, out\+: Cos of z \\
\hline
\mbox{\tt in,out}  & {\em y} & in\+: 0, out\+: Sin of z \\
\hline
\mbox{\tt in,out}  & {\em z} & in\+: fixed point version of angle in quads, out\+: not used \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
void 
\end{DoxyReturn}


Definition at line 102 of file cordic.\+c.



Referenced by Adjust\+Font\+Table(), Circular(), cordic\+\_\+quad(), Font\+Adjust\+Small(), tft\+\_\+\+Bezier2(), tft\+\_\+\+Bezier3(), tft\+\_\+clip\+\_\+xy(), and user\+\_\+loop().

\index{cordic.\+c@{cordic.\+c}!Y@{Y}}
\index{Y@{Y}!cordic.\+c@{cordic.\+c}}
\subsubsection[{\texorpdfstring{Y}{Y}}]{\setlength{\rightskip}{0pt plus 5cm}{\bf Cordic\+\_\+T} Y}\hypertarget{cordic_8c_ab746e677f466f17031e92ed577fc3c15}{}\label{cordic_8c_ab746e677f466f17031e92ed577fc3c15}


Definition at line 102 of file cordic.\+c.



Referenced by Adjust\+Font\+Table(), Circular(), cordic\+\_\+quad(), Font\+Adjust\+Small(), tft\+\_\+\+Bezier2(), tft\+\_\+\+Bezier3(), tft\+\_\+clip\+\_\+xy(), and user\+\_\+loop().

\index{cordic.\+c@{cordic.\+c}!Z@{Z}}
\index{Z@{Z}!cordic.\+c@{cordic.\+c}}
\subsubsection[{\texorpdfstring{Z}{Z}}]{\setlength{\rightskip}{0pt plus 5cm}{\bf Cordic\+\_\+T} Z}\hypertarget{cordic_8c_a3da94d1c83a43c30add6c05fbbe1f194}{}\label{cordic_8c_a3da94d1c83a43c30add6c05fbbe1f194}


Definition at line 102 of file cordic.\+c.



Referenced by Circular().

